Skip to content

Alpha channel should be 1 by default, rather than 0 #2197

Merged
doug-walker merged 9 commits intoAcademySoftwareFoundation:mainfrom
pennelee:feature/1781_2025_alpha_channel_one
Mar 5, 2026
Merged

Alpha channel should be 1 by default, rather than 0 #2197
doug-walker merged 9 commits intoAcademySoftwareFoundation:mainfrom
pennelee:feature/1781_2025_alpha_channel_one

Conversation

@pennelee
Copy link
Contributor

Related to issue #1781.

For CPU processor, when source has no alpha (RGB) but dest does (RGBA) make it default to 1.
GPU Processors (new and legacy) did not seem to have this issue, alpha was already set to 1. Let me know if this is not the case.

Tested changes with ocioconvert and changed the output to force RGBA, since the default is to use inplace conversion (did not check in those changes).
Tested with all the ocioconvert test cases (basic, --lut, --view, --invertview --namedtransform, --invnamed transform), and various EXR file sizes.

Before the changes alpha would be 0, so image was not viewable. After the changes then images can be viewed and from inspection the alpha channel is now 1.0.

Also updated related CPU tests to reflect non zero alpha values.

Signed-off-by: pylee <penne.y.lee@intel.com>
@doug-walker
Copy link
Collaborator

Thanks for the contribution @pennelee !

Added the devdays25 label.

pennelee and others added 2 commits January 31, 2026 09:41
@pennelee pennelee requested a review from cozdas February 1, 2026 06:44
@pennelee
Copy link
Contributor Author

pennelee commented Feb 1, 2026

Hi @cozdas ,
Finally I have made some update, could you please review again and let me know if you have any feedback. Thank you.

Copy link
Collaborator

@cozdas cozdas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pennelee,
The unit test expected values are now making much more sense, thanks for the fix but the value that needs to be used should be derived from the input bit depth, not output, I added comments to some of the relevant lines.

I believe the tests will still pass when you use the input depth instead of the output.

pennelee and others added 4 commits February 2, 2026 21:21
Signed-off-by: pylee <penne.y.lee@intel.com>
Signed-off-by: pylee <penne.y.lee@intel.com>
Signed-off-by: pylee <penne.y.lee@intel.com>
Copy link
Collaborator

@cozdas cozdas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just added a minor suggestion.
Thanks for the fixes.

Co-authored-by: Cuneyt Ozdas <github@cuneytozdas.com>
Signed-off-by: PenneLee <pennelee@gmail.com>
@pennelee
Copy link
Contributor Author

Hi @doug-walker - Could you also review the changes? Thank you!

Copy link
Collaborator

@doug-walker doug-walker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing through on this @pennelee , it was a challenging one!

@doug-walker doug-walker merged commit d9eb50c into AcademySoftwareFoundation:main Mar 5, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants